package org.osoftware.mumi.dao.model;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * The Class Speciality.
 */
@Entity
@Table(name="speciality")
public class Speciality extends BaseObject{

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -4352732676767372688L;
	
	/** The name. */
	@Column(name="name")
	private String name;

	/** The specialists. */
	@OneToMany(mappedBy="speciality")
	private List<Specialist> specialists;

	
	
	/**
	 * Gets the name.
	 *
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * Sets the name.
	 *
	 * @param name the new name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * Gets the specialists.
	 *
	 * @return the specialists
	 */
	public List<Specialist> getSpecialists() {
		return specialists;
	}

	/**
	 * Sets the specialists.
	 *
	 * @param specialists the new specialists
	 */
	public void setSpecialists(List<Specialist> specialists) {
		this.specialists = specialists;
	}

	/* (non-Javadoc)
	 * @see org.osoftware.mumi.dao.model.BaseObject#toString()
	 */
	@Override
	public String toString() {
		return "Speciality [specialists=" + specialists + ", toString()="
				+ super.toString() + "]";
	}
	
	
}
